package com.pets.dao;

import com.pets.entity.Knowledge;
import com.pets.util.PageData;
import com.pets.vo.KnowledgeListVO;
import com.pets.vo.KnowledgesByPageVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface KnowledgeMapper {
    int deleteByPrimaryKey(Integer kid);

    int insert(Knowledge record);

    int insertSelective(Knowledge record);

    Knowledge selectByPrimaryKey(Integer kid);

    int updateByPrimaryKeySelective(Knowledge record);

    int updateByPrimaryKey(Knowledge record);
    //查询所有百科知识
    //PageData<Knowledge> allKnowledges(int page,int pageSize,String content);
    //普通用户的百科知识分页显示
    //PageData<Knowledge> selectKnowledge(int page, int pageSize , int uid);

    //分页查询
      List<KnowledgesByPageVO> selectKnowledgesByPage(@Param(value="start") int start, @Param(value="pageSize") int pageSize);

     int selectKnowledgesCount();
    KnowledgesByPageVO selectKnowledgeByKid(int kid);

    //查询所有知识列表
    List<KnowledgeListVO> getKnowledgeList();
}